package com.example.security.util;

public class GenerateClientCredentials {
    public static void main(String[] args) {
        String clientId = ClientCredentialsGenerator.generateClientId();
        String clientSecret = ClientCredentialsGenerator.generateClientSecret();
        
        System.out.println("Generated Client Credentials:");
        System.out.println("Client ID: " + clientId);
        System.out.println("Client Secret: " + clientSecret);
        
        System.out.println("\nSQL Insert Statement:");
        System.out.println("INSERT INTO `sys_oauth_client` " +
            "(`client_id`, `client_secret`, `client_name`, `grant_types`, `access_token_validity`) " +
            "VALUES " +
            "('" + clientId + "', '" + clientSecret + "', 'Spring Security应用', 'password,refresh_token', 7200);");
        
        System.out.println("\nApplication YAML Configuration:");
        System.out.println("sso:");
        System.out.println("  client-id: " + clientId);
        System.out.println("  client-secret: " + clientSecret);
    }
} 